package cn.bdqn.mapper;

import cn.bdqn.domain.Hospitalized;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface HospitalizedMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Hospitalized record);

    int insertSelective(Hospitalized record);

    Hospitalized selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Hospitalized record);

    int updateByPrimaryKey(Hospitalized record);

    int updateByRegisId(int regisId);

    /**
     * 根据处方id修改住院表的支付状态
     * @param registrationId
     * @return
     */
    int updateByRegistrationId(String registrationId);

    List<Hospitalized> selectAllHospDayAndID();

    void updateHospDayPlus1ById(@Param("hospitalizeds") List<Hospitalized> hospitalizeds);

    /**
     * 出院 修改 费用结算字段和住院总天数
     * @param
     */
    void updateByID(Hospitalized hospitalized);

    /**
     * 根据姓名或者 挂号id(身份证号)去查询住院记录
     * @param name
     * @param registrationId
     * @return
     */

    List<Hospitalized> selectByNameAndRegistrationId(@Param("name") String name, @Param("registrationId") String registrationId);


    BigDecimal selectOnedayMoneyByBunkName(String BunkName);

    /*
     * 根据registrationId修改住院状态
     * @param registrationId
     * @return
     */

    int  updateStatusByRegistrationId(String registrationId);

    List<Hospitalized> selectAll();

    List<Hospitalized> selectHospitalizedByRegistrationIdAndName(@Param("registrationId") String registrationId, @Param("name") String name);
}